/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package detai1chupi;

import javax.swing.JButton;
import javax.swing.jButton1;
/**
 *
 * @author chupi
 */
public class MainForms extends javax.swing.JFrame {
    private static int CENTER;
    private jButton1 jButton1;
    /**
     * Creates new form MainForms
     */
    public MainForms() {
        initComponents();
    }
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jLabel1.setText("Tên server");

        jTextField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField1ActionPerformed(evt);
            }
        });

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Mã sách", "Tên sách", "Tác giả", "Ngày sản xuất", "Ngày đăng ký"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Long.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        jButton1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton1.setText("Trở về");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextField1))
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 558, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jButton1)
                .addGap(19, 19, 19))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addGap(0, 17, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        jButton1 = new javax.swing.jButton1();
        // create JFrame
        setDefaultCloseOperation(MainForms.EXIT_ON_CLOSE);
        setSize(83, 22);
        // create JButton with text "Click Button"
        JButton btn = new JButton("Trở về");
        // display JFrame
        setLocationRelativeTo(null);
        setVisible(true);
    }  
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
        // TODO add your handling code here:
        JTextField = new javax.swing.jTextField1();
}
    }//GEN-LAST:event_jTextField1ActionPerformed
   private void jLabel1ActionPerformed(java.awt.Event.Event evt) {
        jLabel1 jLabel1 = new jLabel1("Tên server");
                        private void actionPerformed(ActionEvent arg0[]) {
                changejLabel1();
              }
            private void changejLabel1() {
                throw new UnsupportedOperationException("tên server") };
    /**
     * @param args the command line arguments
     */
    private void jTable1ActionPerformed(java.awt.Event evt){    
        public class SachImpl {
            private long masach;
            private String tensach;
            private String tacgia;
            private int ngayxuatban;
            private int ngaydangky;
            public SachImpl() {
            }
          public SachImpl(long masach, String tensach, String tacgia, int ngayxuatban,
            int ngaydangky) {
                this.masach = masach;
                this.tensach = tensach;
                this.tacgia = tacgia;
                this.ngayxuatban = ngayxuatban;
                this.ngaydangky = ngaydangky;
            }
                    public double getMasach() {
                        return masach;
                    }
                    public void setMasach(long masach) {
                        this.masach = masach;
                    }
                    public String getTensach() {
                        return tensach;
                    }
                    public void setTensach(String tensach) {
                        this.tensach = tensach;
                    }
                    public String getTacgia() {
                        return tacgia;
                    }
                    public void setTacgia(String tacgia) {
                        this.tacgia = tacgia;
                    }
                    public int getNgayxuatban() {
                        return ngayxuatban;
                    }
                    public void setNgayxuatban(String ngayxuatban) {
                        this.ngayxuatban = ngayxuatban;
                    }
                    public int getNgaydangky() {
                        return ngaydangky;
                    }
                    public void setNgaydangky(int ngaydangky) {
                        this.ngaydangky = ngaydangky;
                    }    
                }
        public int getRowCount() {
            return values.length
            };
        public int getColumnCount() {
            return values[0].length
            };
        public int getValueAt(int rowIndex, int columnIndex) 
            {
            return values[rowIndex][columnIndex]};
        public int getColumnName ()
            {
            return columnNames[column] };
   public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() 
                new registerForms().setVisible(true);
            
        });
     }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField jTextField1;
    // End of variables declaration//GEN-END:variables
 }
